$(function () {

  // 发送请求
  newMes();
  newCom();

  // 获取最新资讯的请求
  function newMes() {
    $.ajax({
      url: window.BigNew.index_latest,
      success: function (response) {
        const htmlStr = template('newsTemp', response);
        $('.common_news').html(htmlStr);
      }
    });
  }

  // 获取评论的请求
  function newCom() {
    $.ajax({
      url: window.BigNew.index_latest_comment,
      success: function (response) {
        console.log(response);
        $('.comment_list').html(template('comTemp', response));
      }
    });
  }
})